import { TestService } from './../test.service';
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-sub2',
  templateUrl: './sub2.component.html',
  styleUrls: ['./sub2.component.scss']
})
export class Sub2Component implements OnInit {

  uid: symbol = Symbol('a');
  constructor(private testService: TestService) {

    this.testService.add(this.uid);
    setTimeout(() => {
      console.log('Sub2Component done');
      this.testService.done(this.uid);
    }, 5000);

  }

  ngOnInit(): void {
  }

}
